package com.qf.controller;

import com.qf.Resp.BaseResp;
import com.qf.service.HcSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.io.IOException;
import java.text.ParseException;

/**
 * @author H
 * @create 2020-11-02 17:43
 * @strive To be whoever you want to be.
 * @Description:
 */
@RestController
public class SearchController {

    @Autowired
    HcSearchService searchService;

    @RequestMapping("/search/{key}")
    public BaseResp search(@PathVariable("key") String key) throws IOException, ParseException {
        return searchService.search(key);
    }
}
